import {axioslink} from '@/api/api'

export let MyIndex={
    state:{
        MyIndexDetail:[],
        content:{}
    },
    mutations:{
        MyIndexDetailInit(state,payload){
            state[payload.key]=payload.value;
            console.log(state[payload.key])
        }
    },
    actions:{
        MyIndexDetailxaios(context){

            axioslink("/MyIndex/list","get").then((ok)=>{
                context.commit("MyIndexDetailInit",{key:"MyIndexDetail",value:ok.data.MyIndex});
                context.commit("MyIndexDetailInit",{key:"content",value:ok.data.MyIndex[0]});
            })
        }
    }
}